package com.guomao.stream;

import java.util.*;
import java.util.stream.Stream;

public class StreamDemoB {

    public static void main(String[] args) {

        ArrayList<String> list = new ArrayList<>();
        Stream<String> stream1 = list.stream();


        HashSet<Integer> set = new HashSet<>();
        Stream<Integer> stream2 = set.stream();

        HashMap<String, Integer> map = new HashMap<>();

        map.put("中国", 1000);


        Set<String> keySet = map.keySet();
        Stream<String> stream = keySet.stream();

        Collection<Integer> values = map.values();
        Stream<Integer> stream3 = values.stream();

        Set<Map.Entry<String, Integer>> entries = map.entrySet();
//        Stream<Map.Entry<String, Integer>> stream4 = entries.stream();

//        for (Map.Entry<String, Integer> entry : entries) {
//            System.out.println(entry.getKey() + ":" + entry.getValue());
//        }


        int [] arr ={1,2,3};

        Stream<int[]> stream4 = Stream.of(arr);
    }
}
